-
-
Notifications
You must be signed in to change notification settings - Fork 353
Fix the issue with changing immutable metadata structure in the contructor of ReactNativeClient
#5202
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
Android (legacy) Performance metrics 🚀
|
Revision | Plain | With Sentry | Diff |
---|---|---|---|
f70acbf+dirty | 373.39 ms | 382.81 ms | 9.43 ms |
49ef936+dirty | 405.96 ms | 417.22 ms | 11.26 ms |
7be1f99 | 454.83 ms | 461.36 ms | 6.53 ms |
000da7a | 454.46 ms | 445.00 ms | -9.46 ms |
bfe454a+dirty | 573.44 ms | 579.46 ms | 6.02 ms |
7480abe+dirty | 411.60 ms | 405.81 ms | -5.78 ms |
64cd15c | 439.02 ms | 427.63 ms | -11.39 ms |
23080e5 | 384.85 ms | 382.57 ms | -2.28 ms |
5526494 | 440.84 ms | 448.36 ms | 7.52 ms |
c08359e | 421.87 ms | 445.37 ms | 23.50 ms |
App size
Revision | Plain | With Sentry | Diff |
---|---|---|---|
f70acbf+dirty | 17.75 MiB | 19.68 MiB | 1.94 MiB |
49ef936+dirty | 17.75 MiB | 19.69 MiB | 1.94 MiB |
7be1f99 | 17.75 MiB | 20.15 MiB | 2.41 MiB |
000da7a | 17.75 MiB | 19.68 MiB | 1.94 MiB |
bfe454a+dirty | 17.75 MiB | 19.69 MiB | 1.94 MiB |
7480abe+dirty | 17.75 MiB | 19.68 MiB | 1.94 MiB |
64cd15c | 17.75 MiB | 20.15 MiB | 2.41 MiB |
23080e5 | 17.75 MiB | 19.68 MiB | 1.94 MiB |
5526494 | 17.75 MiB | 19.68 MiB | 1.93 MiB |
c08359e | 17.75 MiB | 20.15 MiB | 2.41 MiB |
Android (new) Performance metrics 🚀
|
Revision | Plain | With Sentry | Diff |
---|---|---|---|
a0b15d6+dirty | 414.33 ms | 448.85 ms | 34.52 ms |
f70acbf+dirty | 520.12 ms | 558.91 ms | 38.79 ms |
49ef936+dirty | 333.72 ms | 387.51 ms | 53.79 ms |
bfe454a+dirty | 372.42 ms | 424.52 ms | 52.10 ms |
7480abe+dirty | 363.80 ms | 431.34 ms | 67.54 ms |
20d5eaa+dirty | 358.31 ms | 442.37 ms | 84.06 ms |
c4e097a+dirty | 382.43 ms | 443.77 ms | 61.34 ms |
7be1f99+dirty | 369.02 ms | 399.60 ms | 30.58 ms |
64cd15c+dirty | 488.79 ms | 483.54 ms | -5.24 ms |
534ba8c+dirty | 472.35 ms | 537.31 ms | 64.96 ms |
App size
Revision | Plain | With Sentry | Diff |
---|---|---|---|
a0b15d6+dirty | 7.15 MiB | 8.42 MiB | 1.27 MiB |
f70acbf+dirty | 7.15 MiB | 8.41 MiB | 1.26 MiB |
49ef936+dirty | 7.15 MiB | 8.42 MiB | 1.26 MiB |
bfe454a+dirty | 7.15 MiB | 8.42 MiB | 1.26 MiB |
7480abe+dirty | 7.15 MiB | 8.41 MiB | 1.26 MiB |
20d5eaa+dirty | 7.15 MiB | 8.42 MiB | 1.27 MiB |
c4e097a+dirty | 7.15 MiB | 8.41 MiB | 1.26 MiB |
7be1f99+dirty | 7.15 MiB | 8.42 MiB | 1.27 MiB |
64cd15c+dirty | 7.15 MiB | 8.42 MiB | 1.27 MiB |
534ba8c+dirty | 7.15 MiB | 8.42 MiB | 1.27 MiB |
iOS (legacy) Performance metrics 🚀
|
Revision | Plain | With Sentry | Diff |
---|---|---|---|
ec14be7+dirty | 1234.64 ms | 1245.54 ms | 10.90 ms |
d751a5d+dirty | 1215.57 ms | 1220.56 ms | 4.99 ms |
23080e5+dirty | 1216.02 ms | 1224.94 ms | 8.91 ms |
64cd15c+dirty | 1216.31 ms | 1214.04 ms | -2.26 ms |
77061ed+dirty | 1233.16 ms | 1234.88 ms | 1.71 ms |
ba75c7c+dirty | 1235.86 ms | 1226.45 ms | -9.41 ms |
95aaf8a+dirty | 1234.78 ms | 1241.94 ms | 7.16 ms |
98f632c+dirty | 1236.40 ms | 1241.62 ms | 5.22 ms |
534ba8c+dirty | 1230.22 ms | 1231.18 ms | 0.96 ms |
a31630c+dirty | 1229.09 ms | 1230.94 ms | 1.85 ms |
App size
Revision | Plain | With Sentry | Diff |
---|---|---|---|
ec14be7+dirty | 2.63 MiB | 3.98 MiB | 1.34 MiB |
d751a5d+dirty | 2.63 MiB | 3.98 MiB | 1.34 MiB |
23080e5+dirty | 2.63 MiB | 3.91 MiB | 1.28 MiB |
64cd15c+dirty | 2.63 MiB | 3.81 MiB | 1.18 MiB |
77061ed+dirty | 2.63 MiB | 3.98 MiB | 1.34 MiB |
ba75c7c+dirty | 2.63 MiB | 3.81 MiB | 1.18 MiB |
95aaf8a+dirty | 2.63 MiB | 3.87 MiB | 1.24 MiB |
98f632c+dirty | 2.63 MiB | 3.81 MiB | 1.18 MiB |
534ba8c+dirty | 2.63 MiB | 3.81 MiB | 1.18 MiB |
a31630c+dirty | 2.63 MiB | 3.98 MiB | 1.34 MiB |
iOS (new) Performance metrics 🚀
|
Revision | Plain | With Sentry | Diff |
---|---|---|---|
ec14be7+dirty | 1229.62 ms | 1230.53 ms | 0.91 ms |
d751a5d+dirty | 1212.22 ms | 1217.94 ms | 5.71 ms |
23080e5+dirty | 1221.39 ms | 1222.08 ms | 0.70 ms |
64cd15c+dirty | 1213.50 ms | 1223.54 ms | 10.04 ms |
77061ed+dirty | 1210.77 ms | 1218.45 ms | 7.68 ms |
ba75c7c+dirty | 1236.14 ms | 1240.69 ms | 4.55 ms |
95aaf8a+dirty | 1206.83 ms | 1213.65 ms | 6.81 ms |
98f632c+dirty | 1221.38 ms | 1229.26 ms | 7.88 ms |
534ba8c+dirty | 1225.00 ms | 1237.43 ms | 12.43 ms |
a31630c+dirty | 1241.32 ms | 1226.98 ms | -14.34 ms |
App size
Revision | Plain | With Sentry | Diff |
---|---|---|---|
ec14be7+dirty | 3.19 MiB | 4.54 MiB | 1.36 MiB |
d751a5d+dirty | 3.19 MiB | 4.54 MiB | 1.36 MiB |
23080e5+dirty | 3.19 MiB | 4.48 MiB | 1.29 MiB |
64cd15c+dirty | 3.19 MiB | 4.38 MiB | 1.19 MiB |
77061ed+dirty | 3.19 MiB | 4.54 MiB | 1.36 MiB |
ba75c7c+dirty | 3.19 MiB | 4.38 MiB | 1.19 MiB |
95aaf8a+dirty | 3.19 MiB | 4.44 MiB | 1.25 MiB |
98f632c+dirty | 3.19 MiB | 4.38 MiB | 1.19 MiB |
534ba8c+dirty | 3.19 MiB | 4.38 MiB | 1.19 MiB |
a31630c+dirty | 3.19 MiB | 4.54 MiB | 1.36 MiB |
ReactNativeClient
ReactNativeClient
...options._metadata?.sdk?.settings, | ||
}, | ||
}, | ||
}; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The changes follows the new implementation getsentry/sentry-javascript#17364
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yes, but the issue here is that the metadata structure is immutable so instead of modifying it we can construct a new one, and that's what I'm doing in this PR. Other than that, the logic stays pretty much the same.
I've also updated tests to reflect that change and indiciate the expected behaviour which is the following:
- If
sendDefaultPii
istrue
, Sentry will infer the IP address of users' devices to events (errors, traces, replays, etc) in all browser-based SDKs. - If
sendDefaultPii
isfalse
or not set, Sentry will not infer or collect IP address data.
I've updated this PR and updated some tests that were not correct — all those tests were checking if
|
ReactNativeClient
ReactNativeClient
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The change LGTM and handle the reported issue. My understanding is that it also does not break the sendDefaultPii
fix. That said, I'm leaving the final approval to @lucas-zimerman who has more context on that patch.
We should also add a changelog entry since this is user facing and fixes an issue.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
We should follow the quote pattern as it's used on the remaining tests.
Also after adding a changelog, LGTM!
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM 🎸
Thank you for fixing this @alwx 🙇
If this is not a CI issue 😓 there seems to be an issue with the linter ( |
probably related to
|
📢 Type of change
📜 Description
Fixes #5187
📝 Checklist
sendDefaultPII
is enabled🔮 Next steps